package com.skt.domain.PO;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 购物车实体类
 */
@Data
@TableName("shopping_cart")
public class ShoppingCart {

    /**
     * 购物车ID，自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 商品总数量
     */
    @TableField("total_items")
    private Integer totalItems;

    /**
     * 购物车总金额
     */
    @TableField("total_amount")
    private BigDecimal totalAmount;

    /**
     * 购物车状态：1-有效，0-无效/已删除
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 删除时间
     */
    @TableField(value = "deleted_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime deletedAt;
}